package cps

import (
	"github.com/flaravel/quanlaolao/app/models"
	"github.com/flaravel/quanlaolao/pkg/types"
)

type Cps struct {
	ChannelId 	uint64 `gorm:"not null;default:0;comment:'渠道ID'" valid:"channel_id" json:"cate_id"`
	Title 	 	string `gorm:"type:varchar(255);not null;comment:'标题'" valid:"title" json:"title"`
	Tag  	 	string `gorm:"type:varchar(255);not null;comment:'tag标签'" valid:"tag" json:"tag"`
	Logo  	 	string `gorm:"type:varchar(255);not null;comment:'logo图片'" valid:"logo" json:"logo"`
	Image  	 	string `gorm:"type:varchar(255);not null;comment:'banner图片'" valid:"image" json:"image"`
	H5		 	string `gorm:"type:varchar(255);not null;comment:'H5跳转url'" valid:"h5" json:"url"`
	AppId	 	string `gorm:"type:varchar(100);not null;comment:'小程序APP_ID'" valid:"app_id" json:"app_id"`
	Path	 	string `gorm:"type:varchar(255);not null;comment:'小程序路径'" valid:"path" json:"path"`
	Sort  	 	int 	`gorm:"sort" json:"-"`
	models.BaseModel
}


func (c Cps) GetStringID() string {
	return types.Uint64ToString(c.ID)
}